package com.wk.ums.feign;

import com.wk.common.bean.Resp;
import com.wk.ums.entity.Member;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;


@FeignClient("ums-service")
@RequestMapping("member")
public interface MemberFeign {

    /**
     * 根据用户ID查询用户信息
     */
    @GetMapping("{id}")
    Resp<Member> info(@PathVariable("id") Long id);

    /**
     * 用户登录
     */
    @GetMapping("query")
    Resp<Member> queryUser(@RequestParam("username") String username, @RequestParam("password") String password);

}
